package com.sg.dto.biz.app.common;

import com.sg.common.dto.BaseDto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Objects;

/**
 * @desc CoterieMemberDto
 * @使用场景
 */
@Data
public class CoterieMemberDto extends BaseDto implements Serializable {

    /**
     * 虚拟组织成员就职记录ID
     */
    @ApiModelProperty("虚拟组织成员就职记录ID")
    private String virtualOrgInductionRecordId;

    /**
     * 身份人员ID
     */
    @ApiModelProperty("身份人员ID")
    private String originalRoleMemberId;

    /**
     * 个人账号
     */
    @ApiModelProperty("个人账号")
    private String userId;

    /**
     * 组内职务名称
     */
    @ApiModelProperty("组内职务名称")
    private String virtualOrganizationPosition;

    /**
     * 角色标识
     */
    @ApiModelProperty("角色标识")
    private String roleCode;

    /**
     * 是否管理员 TRUE:是 FALSE:否
     */
    @ApiModelProperty("是否管理员")
    private String isAdmin;

    /**
     * 是否负责人 TRUE:是 FALSE:否
     */
    @ApiModelProperty("是否负责人")
    private String isPersonCharge;
    /**
     * 备注首位字母
     */
    @NotNull(message = "备注首位字母不能为空")
    @ApiModelProperty("备注首位字母")
    private String firstLetter;
    /**
     * 虚拟组织成员ID
     */
    @ApiModelProperty("虚拟组织成员ID")
    private String virtualOrgMemberId;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        if (!super.equals(o)) return false;
        CoterieMemberDto that = (CoterieMemberDto) o;
        return virtualOrgInductionRecordId == that.virtualOrgInductionRecordId && originalRoleMemberId == that.originalRoleMemberId && userId == that.userId && virtualOrganizationPosition == that.virtualOrganizationPosition && roleCode == that.roleCode && isAdmin == that.isAdmin && isPersonCharge == that.isPersonCharge && firstLetter == that.firstLetter && virtualOrgMemberId == that.virtualOrgMemberId;
    }

    @Override
    public int hashCode() {
        return Objects.hash(super.hashCode(), virtualOrgInductionRecordId, originalRoleMemberId, userId, virtualOrganizationPosition, roleCode, isAdmin, isPersonCharge, firstLetter, virtualOrgMemberId);
    }

}
